package com.sunshine.springbootshirothymeleaf.dao;

import com.sunshine.springbootshirothymeleaf.entity.Perms;
import com.sunshine.springbootshirothymeleaf.entity.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserDao {

    //用户注册
    void save(User user);

    //用户登入认证
    User findByUserName(String userName);

    //根据用户名查询所有角色
    User findRolesByUserName(String username);

    //根据角色id查询权限集合
    List<Perms> findPermsByRoleId(String id);

}
